/*
 * CodeData.java
 *
 * Created on October 3, 2007, 11:56 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import javax.persistence.MappedSuperclass;

/**
 *
 * @author Tom Hayden
 */
@MappedSuperclass
public class CodeData extends BusinessObject {
    
    protected String description;
    
    protected boolean active;
    
    public CodeData(Integer id) {
        super(id);
    }
    
    public CodeData() {
        this.active = true;
    }
    
    public CodeData(String description) {
        this.setDescription(description);
    }    

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }
    
    public String toString() {
        return super.toString().concat("\ndescription: "+this.getDescription());
    }

}
